package com.tongna.crawler.data.utils;

import com.google.gson.Gson;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

public class RpcUtils {
    public RpcUtils() {
    }

    public static <T> T get(Class<T> cl) {
        Retrofit retrofit = (new Retrofit.Builder()).baseUrl("http://localhost:8080/web/rest/").addConverterFactory(GsonConverterFactory.create(new Gson())).build();
        T service = retrofit.create(cl);
        return service;
    }
}
